import { testStore } from './store'
import { storeToRefs, StateTree } from 'pinia'

const store = testStore()

class Service {
  static getStore() {
    return storeToRefs(store)
  }
  static changeState() {
    store.name = 'test'
  }
  static changeState2() {
    store.$patch((state: StateTree) => {
      state.name = 'xxx22'
    })
  }
  static changeState3() {
    store.changeUser('xxx33')
  }
}

export default Service
